﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Topro.Application.Interface
{
    using Topro.Entity;
    using Topro.Entity.Query;
    using Topro.Entity.Request.Dictionary;
    using Topro.Entity.Response.Dictionary;

    public interface DictionaryService
    {
        /// <summary>
        /// 获取配置
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        public DictionaryResponse Get(int id);

        /// <summary>
        /// 获取类型列表
        /// </summary>
        /// <param name="type">类型</param>
        /// <returns></returns>
        public List<DictionaryResponse> GetByType(int type);

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="type">类型</param>
        /// <returns></returns>
        public List<DictionaryResponse> GetByList();

        /// <summary>
        /// 保存、修改
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JResult SaveDictionary(DictionaryReqeust request);

        /// <summary>
        /// 更新状态
        /// </summary>
        /// <returns></returns>
        public JResult Updatestatus(int id, int status);

        /// <summary>
        /// 配置查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public PagedList<DictionaryQueryResponse> GetPager(DictionaryQuery query);

        /// <summary>
        /// 配置查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public PagedList<DictionaryQueryResponse> GetSelectTypePager(DictionaryQuery query);
    }
}
